<script type="text/javascript">
    $(function () {
        $("#wld_search_grid").edatagrid({
            url: $.webPath() + "/jsgl/wljsd/wldSearchList?sydwId=" + $("#sydwId").val() + "&sydwGsId="+ $("#sydwGsId").val()+"&wljsdZt=0",
            checkbox:true,
            fitColumns:true,
            singleSelect:false,
            pagination:true,
            pageSize:500,
            width:1010,
            height:327,
            rownumbers:true,
            columns: [
                [
                    {field:'checked', checkbox: true},
                    {field:'id', title:'ID', hidden:true},
                    {field:'cgd.id', title:'采购单ID', hidden:true},
                    {field:'sydw.id', title:'受益单位ID', hidden:true},
                    {field:'sydw.qc', title:'受益单位', width:45},
                    {field:'fylb.id', title:'费用类别ID', hidden:true},
                    {field:'fylb.sl', title:'费用类别税率', hidden:true},
                    {field:'fylb.fykmjc', title:'费用类别',align: 'center', width:20},
                    {field:'jfsl', title:'计费数量', width:25,align: 'right',
                        formatter:function(value){
                            var val = formatSlForHtml(value);
                            return val;
                        }},
                    {field:'dj', title:'单价', width:20,align: 'right',
                        formatter:function(value){
                            var val = formatJeForHtml(value);
                            return val;
                        }},
                    {field:'je', title:'金额', width:25,align: 'right',
                        formatter:function(value){
                            var val = formatJe2(value);
                            return val;
                    }},
                    {field:'bz', title:'备注', width:20,align: 'center'},
                    {field:'cg_xs_dh', title:'关联单号', width:35,align: 'center'},
                    {field: 'czzt', title: '是否可结算', width: 15,align: 'center',
                        formatter: function (value) {
                            if (value == "kjs"){
                                return "是";
                            }else{
                                return  "否";
                            }
                        }
                    }
                ]
            ],
            onLoadSuccess:function(){
                $(".datagrid-htable .datagrid-cell").css('text-align', 'center');
            }
        });
        $("#btn_gldh_search").click(function () {
            gldh_search_init();
        });
    })

    function gldh_search_init(){
        $('#wld_search_grid').datagrid('load',{
            gldh: $("#wld_gldh_init").val()
        });
    }
</script>

<input type="hidden" id="sydwId" value="${(sydwId)!}"/>
<input type="hidden" id="sydwGsId" value="${(sydwGsId)!}"/>
<input type="hidden" id="wljsdZt" value="${(wljsdZt)!}"/>
<#--<div id="layout_wld_search" class="easyui-layout" data-options="fit:true">-->
    <#--<div data-options="region:'center'">-->
        <#--<table id="wld_search_grid"></table>-->
    <#--</div>-->
<#--</div>-->
<div id="layout_wld_search" class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center'">
        <div id="toolbar_wld_search">
            <div style="height: 8px;"></div>
            <div class="textcon">
                <table class="tb">
                    <tr>
                        <th>关联单号：</th>
                        <td><input id="wld_gldh_init" type="text" class="input-text"/></td>
                        <td style=" padding-left:10px;">
                            <input id="btn_gldh_search" type="button" class="submit"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <table id="wld_search_grid"></table>
    </div>
</div>